<!-- 头部 -->
{include file="public/top" /}
<!-- /头部 -->
<div class="main-container" id="main-container">
    <!-- left -->
    {include file="public/left" /}
    <!-- /left -->
    <!-- /section:basics/sidebar -->
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <i class="ace-icon fa fa-home home-icon"></i> <a href="#">首页</a>
                    </li>
                    <li><a href="#">分类设置</a></li>
                    <li class="active">编辑分类</li>
                </ul>
                <!-- /.nav-search -->
            </div>
            <div class="page-content">
                <div class="page-header">
                    <div class="row">
                        <div class="col-md-6">
                            <h1>
                                编辑分类
                                <small>
                                    <i class="ace-icon fa fa-angle-double-right"></i>
                                    编辑分类
                                </small>
                            </h1>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-xs-12">
                        <div class="widget-box">
                            <!--<div class="widget-header">-->
                                <!--<h5 class="widget-title" style="color: #2679b5; font-size: 16px;">新增用户组</h5>-->
                            <!--</div>-->

                            <div class="widget-body">
                                <div class="widget-main padding-16">
                                    <div class="row">
                                        <form action="{:url('category/edit')}" method="POST" id="addsubmit" >
                                            <div class="form-group clearfix">
                                                <label class="col-sm-1 label_control no-padding-right" > 上级分类 </label>
                                                <div class="col-sm-10">
                                                    <select name="pid"  class="col-xs-10 col-sm-5" >
                                                        <option value="0">顶级分类</option>
                                                        {volist name="categoryRes" id="category"}

                                                        <option {if condition="$categorys['pid'] eq $category['id']"} selected="selected" {/if} value="{$category.id} ">


                                                            <?php if($category['level']!=0){echo '|';} echo str_repeat('—', $category['level']*1)?>{$category.name}

                                                        </option>

                                                        {/volist}
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group clearfix">
                                                <label class="col-sm-1 label_control no-padding-right" > 分类名称 </label>
                                                <div class="col-sm-10">
                                                    <input type="text"  name="name"  class="col-xs-10 col-sm-5" value="{$categorys.name}" >

                                                </div>
                                            </div>

                                            <div class="form-group clearfix">
                                                <label class="col-sm-1 label_control no-padding-right" > 分类内容 </label>
                                                <div class="col-sm-10">
                                                    <input type="text"  name="description"  class="col-xs-10 col-sm-5"  value="{$categorys.description}">
                                                </div>
                                            </div>





                                            <input type="hidden" name="id" value="{$categorys.id}">
                                            <br>
                                            <div class="col-xs-6 align-center">
                                                <input type="submit"  value="提交保存" class="btn btn-info input-small btn-round">

                                            </div>
                                        </form>





                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
</div><!-- /.main-container -->

